#ifdef a
#include"Quene-tree.h"

//节点创建
QNode* BTBuyQNode(TYPEQ val) {
	QNode* new_qnode = (QNode*)malloc(sizeof(QNode));
	if (!new_qnode) {
		assert(0);
		return NULL;
	}
	new_qnode->next = NULL;
	new_qnode->val = val;
	return new_qnode;
}


//入队
void BTQuenePush(Quene* q, TYPEQ val) {
	assert(q);
	QNode* new_qnode = BTBuyQNode(val);
	q->fear->next = new_qnode;
	q->fear = new_qnode;
	return;
}

//队列初始化
void BTQueneInit(Quene* q) {
	assert(q);
	QNode* head = BTBuyQNode(0);
	q->front = head;
	q->fear = head;
	return;
}


//出队
void BTQueneOut(Quene* q) {
	if (BTQueneIsEmpty(q))
		return;
	QNode* del_qnode = q->front->next;
	q->front->next = del_qnode->next;
	if (del_qnode == q->fear)
		q->fear = q->front;
	free(del_qnode);
	del_qnode = NULL;
	return;
}


//队头
TYPEQ BTQueneFront(Quene* q) {
	if (BTQueneIsEmpty(q))
		return NULL;//代表空
	return q->front->next->val;
}


//查空
int BTQueneIsEmpty(Quene* q) {
	assert(q);
	return q->front == q->fear;
}


//销毁
void BTQueneDestory(Quene* q) {
	assert(q);
	QNode* del_qnode = NULL;
	while (q->front) {
		del_qnode = q->front;
		q->front = del_qnode->next;
		free(del_qnode);
		del_qnode = NULL;
	}
}
#endif//整数除法1
#include<stdio.h>
#include<math.h>
int main() {
	int div1, div2, x, y;//div1:被除数      div2:除数
	int flag = 1;//正负标志
	int count = 0;//商
	printf("被除数 / 除数 = 商\n");
	scanf("%d%d", &x, &y);
	div1 = x, div2 = y;
	if (div1 * div2 < 0)
		flag = -1;
	
	while (abs(div1) >= abs(div2)) {
		div1 = abs(div1) - abs(div2);
		count++;
	}
	printf("%d / %d = %d\n", x, y, flag * count);
	return 0;
}